#ifndef __MY_I2C_H
#define __MY_I2C_H
#include "stm32f1xx.h"                  // Device header


void IIC_Init(void);
void IIC_Start(void);
void IIC_Stop(void);
void IIC_SendByte(uint8_t Byte);
uint8_t IIC_ReceiveByte(void);
void IIC_SendACK(uint8_t ACKBit);
uint8_t IIC_ReceiveACK(void);

void IIC_Write_Register(uint8_t address, uint8_t reg, uint8_t data);
uint8_t IIC_Read_Register(uint8_t address, uint8_t reg);
void IIC_Read_Registers(uint8_t address, uint8_t reg, uint8_t* data, int len);

#endif
